{template 'common/header'}
<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="form1">

  <div class="panel panel-success">
      <div class="panel-heading"> 基本信息 </div>
      <div class="panel-body">
          <div class="form-group">
              <label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label"> 奖品名称 </label>
              <div class="col-sm-8">
                  <input type="text" name="rtitle" class="form-control" value="{php echo !empty($rule['rtitle'])?$rule['rtitle']:"活动奖项"; }" />
              </div>
          </div>

          <div class="form-group">
              <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 顶部banner </label>
              <div class="col-sm-9 col-xs-12">
                  {php echo tpl_form_field_image('rheadpic',!empty($rule['rheadpic'])?$rule['rheadpic']:"../addons/$this->modulename/template/mobile/images/img/hdjx.png");}
              </div>
          </div>
      </div>
  </div>

  <div class="panel panel-success">
      <div class="panel-heading">
        游戏奖项设置
      </div>
      <div class="panel-body">
          <div class="form-group">
              <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 游戏奖项 </label>
              <div class="col-sm-9 col-xs-12">
                  <textarea name="award" class="form-control richtext" cols="70">{$rule['award']}</textarea>
              </div>
          </div>
      </div>
  </div>

  <div class="panel panel-success">
      <div class="panel-heading">
        游戏规则设置
      </div>
      <div class="panel-body">
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 游戏规则 </label>
            <div class="col-sm-9 col-xs-12">
                <textarea name="rule" class="form-control richtext" cols="70">{$rule['rule']}</textarea>
            </div>
        </div>

        <!-- <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 活动时间 </label>
            <div class="col-sm-9 col-xs-12">
                {php echo tpl_form_field_daterange('datelimit', array('starttime'=>date('Y-m-d',$settings['starttime']),'endtime'=>date('Y-m-d',$settings['endtime'])))}
            </div>
        </div> -->

      </div>
  </div>

  <div class="panel panel-success">
      <div class="panel-heading"> 排行榜分享设置 </div>
      <div class="panel-body">

          <div class="form-group">
              <label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label"> 分享标题 </label>
              <div class="col-sm-8">
                <input type="text" name="rsharetitle" class="form-control" value="{php echo !empty($rule['rsharetitle'])?$rule['rsharetitle']:"游戏排行榜"; }" />
              </div>
          </div>

          <div class="form-group">
              <label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label"> 分享描述 </label>
                  <div class="col-sm-8">
                      <input type="text" name="rsharedesc" class="form-control" value="{$rule['rsharedesc']}" />
                  </div>
          </div>

          <div class="form-group">
              <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 分享图标 </label>
              <div class="col-sm-9 col-xs-12">
                  {php echo tpl_form_field_image('rsharepic',!empty($rule['rsharepic'])?$rule['rsharepic']:"../addons/$this->modulename/icon.jpg");}
              </div>
          </div>
      </div>
  </div>

  <div class="form-group col-sm-12">
      <input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
      <input type="hidden" name="token" value="{$_W['token']}" />
  </div>

</form>
<script language='javascript'>
  require(['jquery', 'util'], function($, u){
    $(function(){
      u.editor($('.richtext')[0]);
      u.editor($('.richtext')[1]);
    });
  });
</script>
{template 'common/footer'}